<?php
class Noticia extends AppModel {
	var $name = 'Noticia';
	var $primaryKey = 'id_noticias';
	var $displayField = 'titulo';
	
	function afterFind($results){
		foreach($results as &$item){
			if(isset($item['Noticia']['date_data'])){
				$aux = explode('-', $item['Noticia']['date_data']);
				$item['Noticia']['date_data_view'] = $aux[2].'/'.$aux[1].'/'.$aux[0];
			}
		}
		
		return $results;
	}
}
?>